home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
batchut
/
ifits31.zip
/
IFITS.DOC
next >
Wrap
Text File
|
1991-11-09
|
19KB
|
369 lines
-----------------------------------------------------------------
IFITS.EXE Batch file utility
Conditional execution batch file utility, with virus checking.
Part of the SETHware Grabbag, published by sThomas.
-----------------------------------------------------------------
WHAT IFITS DOES
IFITS started out as an extremely flexible way to run hard disk
backups from the AUTOEXEC.BAT file. Along the way, it's grown.
An IFITS command typically looks like this:
>>> ifits 9am do lotus
This command would call up LOTUS.COM if the system clock reads
somewhere between 9:00 A.M. and 9:59 A.M. Otherwise, it would
simply exit.
You can stack conditions. For instance, you could use this
statement:
>>> ifits THU FRI 12/25 EOM do simcity
In this case, if it's Thursday, OR it's Friday, OR it's Christmas,
OR it's the last day of the month, you'd play SIMCITY - otherwise,
you wouldn't. Let's look at a file name.
>>> ifits FRI file d:\store\accounts.dta do checking
In this case, if the accounts.dta file was last updated on a
Friday, ifits will execute the checking program (or perhaps,
given the name, it's a batch file called CHECKING.BAT).
>>> ifits today file appoint.doc do backup
In this case, you want to do a backup if your appoint.doc file
was updated today. (You might put this one in a batch file you
call last thing before you leave the office.)
Here are the basic rules:
> If there's a FILE keyword, the next word on the command
line should be the filename.
> All the 'conditions' on the command line need to be LEFT
of the DO keyword. (Otherwise, IFITS thinks it's part
of the command to be executed.)
> Normally, if ANY condition is true, the command is executed.
> If you use the NOT keyword, the command is ignored if ANY
condition is true. (It executes only if ALL conditions are
false. IFITS NOT THU FRI DO SOMETHING will never execute
SOMETHING.)
> You can "stack" IFITS. (IFITS fri DO IFITS NOT 12am DO 123
will execute 123 if it's Friday and not between midnight
and 12:59 A.M.)
> IFITS uses a secondary command processor which overlays
IFITS in memory. That means that the ONLY memory IFITs
takes away from you application is an extra copy of the
environment. (You can adjust that using the SHELL
statement in your CONFIG.SYS file - see your DOS manual).
It also means that if you run a batch file as the
command, any SET statements do NOT affect the master
environment; you need to use DEEPSET, available on the
SETHware Grabbag utility disk.
Here are the ifits vocabulary:
1 through 31 checks Day of month
1/1 through 12/31 checks Day of year
EOM checks End (last day) Of Month
12am through 11pm checks Hour part of time
TODAY checks using today's date
(always true if no file)
JAN through DEC checks Month of Year
AM checks for before noon
PM checks for after noon
ASCII named file is ASCII text file
(never true if no file)
NOT all conditions must be untrue
FILE check against file datestamp
instead of against system
date/time
DO everything that follows is
the command to be executed.
-----------------------------------------------------------------
VIRUS CHECKING!
IFITS tends to be used in the AUTOEXEC.BAT file. Programs that
get executed a lot tend to be very susceptible to virii. As an
added feature, IFITS inspects itself to check for viral infection.
If it detects a change, it will report to you. While this does
not take the place of a virus-scanning program, it will serve to
give you early warning of many viruses.
If you're not going to use IFITS for any other reason, put the
line IFITS NOT TODAY DO DIR in your AUTOEXEC.BAT. Obviously, it
is never "not today," and you'll never see a DIR, but you'll get
the virus-checking anyway.
-----------------------------------------------------------------
IFITS and MKMTFILE
MKMTFILE is a program that creates files of zero length. For
most people, a file of just 1 byte requires 4096 bytes of room
on the hard disk. A zero-length file, however, requires no
disk space at all - it just takes up another filename slot in
your directory.
MKMTFILE ("Make empty file") works nicely with IFITS, because
you can use empty files in your batch files to flag whether
something has happened or not happened. DOS gives you their
"if exists" command that works nicely with MKMTFILE, but IFITS
lets you examine the date or time the empty file was created.
Of course, if you're creating empty files, you may need to
erase those files. DELMTFIL searches out and erases all
files of zero length, to keep your directories clean and easy
to read. Both MKMTFILE and DELMTFIL are part of the SETHware
Grabbag.
-----------------------------------------------------------------
WHAT IS SHAREWARE?
IFITS is part of the SETHware Grabbag, a shareware package of
utilities from sThomas. Shareware isn't a different type of
software; it's a marketing technique with two big differences.
The first is the shareware guarantee. We're so sure you'll love
our products, we let you try them before you buy them.
The second is the value difference. Ever notice that a $500
program only costs $100 for existing users to buy from the
publisher? That's because retail and wholesale eats up 80% of
the purchase price! Because we sell directly to the user at
wholesale prices, we can give you a more valuable program at a
fraction of the expense.
Please try out IFITS for a month or two. If you find that IFITS
is useful and handy, we ask you to do two things.
1. Pass copies along to your friends, relatives,
neighbors and co-workers, so they can try it, too.
Tell them what you like about IFITS (and what you
dislike, too - we're happy to stand or fall on our
merits.)
2. Buy a license for IFITS. . You see, that way, we
get stuck with a BIG income tax bill, and we just
love to send money to the IRS.
Please ensure that the copies of IFITS or of the SETHware Grabbag
that you pass along are complete with all related files.
-----------------------------------------------------------------
LICENSING
IFITS is part of the SETHware Grabbag. You can license the
complete SETHware Grabbag or license any individual SETHware
Grabbag program by itself.
We have 'single' licenses, 'WAN/LAN' licenses, and site licenses.
Single licenses follow the Borland '